In [1]:
%load_ext autoreload
%autoreload 2
%aimport vector
%aimport line
In [2]:
from vector import *
In [7]:
from line import *
l1 = Line(Vector([4.046, 2.836]), 1.21)
l2 = Line(Vector([10.115, 7.09]), 3.025)
print l1.intersection_with(l2)
print 'Same?', l1 == l2
l1 = Line(Vector([7.204, 3.182]), 8.68)
l2 = Line(Vector([8.172, 4.114]), 9.883)
print l1.intersection_with(l2)
l1 = Line(Vector([1.182, 5.562]), 6.744)
l2 = Line(Vector([1.773, 8.343]), 9.525)
print l1.intersection_with(l2)
In [8]:
%aimport plane
In [21]:
from plane import *
p1 = Plane(Vector([-0.412, 3.806, 0.728]), -3.46)
p2 = Plane(Vector([1.03, -9.515, -1.82]), 8.65)
print p1.is_parallel_to(p2)
print p1 == p2
p1 = Plane(Vector([2.611, 5.528, 0.283]), 4.6)
p2 = Plane(Vector([7.715, 8.306, 5.342]), 3.76)
print p1.is_parallel_to(p2)
print p1 == p2
p1 = Plane(Vector([-7.926, 8.625, -7.212]), -7.952)
p2 = Plane(Vector([-2.642, 2.875, -2.404]), -2.443)
print p1.is_parallel_to(p2)
print p1.__eq__(p2)